<admintpl file="header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>{:L('USER_INDEXADMIN_INDEX')}</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('Indexadmin/index')}">
        用户ID：
        <input type="text" name="uid" style="width: 100px;" value="{:I('request.uid')}" placeholder="请输入用户ID">
        关键字：
        <input type="text" name="keyword" style="width: 200px;" value="{:I('request.keyword')}" placeholder="用户名/昵称/邮箱">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:U('Indexadmin/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th align="center">ID</th>
                <th>{:L('USERNAME')}</th>
                <th>{:L('NICENAME')}</th>
                <th>{:L('AVATAR')}</th>
                <th>{:L('EMAIL')}</th>
                <th>{:L('REGISTRATION_TIME')}</th>
                <th>{:L('LAST_LOGIN_TIME')}</th>
                <th>{:L('LAST_LOGIN_IP')}</th>
                <th>{:L('STATUS')}</th>
                <th align="center">{:L('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <php>
                $user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));
            </php>
            <foreach name="list" item="vo">
                <tr>
                    <td align="center">{$vo.id}</td>
                    <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:L('THIRD_PARTY_USER'))}</td>
                    <td>{$vo['user_nicename']?$vo['user_nicename']:L('NOT_FILLED')}</td>
                    <td><img width="25" height="25" src="{:U('user/public/avatar',array('id'=>$vo['id']))}"/></td>
                    <td>{$vo.user_email}</td>
                    <td>{$vo.create_time}</td>
                    <td>{$vo.last_login_time}</td>
                    <td>{$vo.last_login_ip}</td>
                    <td>{$user_statuses[$vo['user_status']]}</td>
                    <td align="center">
                        <neq name="vo.id" value="1">
                            <a href="{:U('indexadmin/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                               data-msg="{:L('BLOCK_USER_CONFIRM_MESSAGE')}">{:L('BLOCK_USER')}</a>|
                            <a href="{:U('indexadmin/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn"
                               data-msg="{:L('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:L('ACTIVATE_USER')}</a>
                            <else/>
                            <a style="color: #ccc;">{:L('BLOCK_USER')}</a>|
                            <a style="color: #ccc;">{:L('ACTIVATE_USER')}</a>
                        </neq>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>